package cn.ingrun.first_spring_cloud_client2.remote;

import cn.ingrun.first_spring_cloud_client2.models.ResponseJson;
import cn.ingrun.first_spring_cloud_client2.utils.MyResponse;
import feign.hystrix.FallbackFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@RequestMapping("/fallback/hello")
public class HelloFallBack implements Hello {
    @Override
    public String hello() {
        return null;
    }

    @Override
    public ResponseEntity<ResponseJson> get(int id) {
        return MyResponse.error("get方法调用失败");
    }

}
